import 'dart:collection';

//To make a collection immutable once it has been built and not modify the original
//collection to guarantee absolute immutability, although the elements
//in that collection are still mutable.
void main() {
  var list = new List.from([1, 2, 3, 4]);
  list.add(5);

  var unmodifiable = new UnmodifiableListView(list);
  //Unhandled exception: Unsupported operation: Cannot add to an unmodifiable list
  unmodifiable.add(6);
}
//EOP
